<%@ page contentType="text/html;charset=UTF-8" pageEncoding="UTF-8" language="java"%>
<%@ taglib uri="http://java.sun.com/jsp/jstl/core" prefix="c"%>
<%@ taglib uri="http://java.sun.com/jsp/jstl/fmt" prefix="fmt"%>
<%@ taglib uri="http://java.sun.com/jsp/jstl/functions" prefix="fn"%>

<!DOCTYPE html>
<head>
    <title>宠物之家</title>
    <link rel="StyleSheet" href="css/petstore.css" type="text/css" media="screen" />
    <link rel="stylesheet" href="css/mid.css">
    <script src="https://kit.fontawesome.com/bdf4cd41e2.js" crossorigin="anonymous"></script>
    <script src="js/jquery-3.6.1.min.js" crossorigin="anonymous"></script>
    <meta http-equiv="Content-Type" content="text/html; charset=utf-8">
</head>
<body>
    <div id="Header">
        <div id="Logo">
            <div id="LogoContent">
                <a href="index.jsp" id="LogoImage">
                    <i class="fa-sharp fa-solid fa-squirrel"></i>
                </a>
                <span id="LogoText">宠物之家</span>
            </div>
        </div>

        <div id="Menu">
            <div id="MenuContent">
                <c:if test="${sessionScope.loginUser == null}">
                    <a href="LoginForm">登录</a>
                    <img src="images/separator.gif" />
                    <a href="RegisterForm">注册</a>
                </c:if>
                <c:if test="${sessionScope.loginUser != null}">
                    <a href="AccountOrderForm">订单</a>
                    <img src="images/separator.gif" />
                    <a href="CartForm"><i class="fa-solid fa-cart-shopping"></i></a>
                    <img src="images/separator.gif" />
                    <a href="AccountForm">个人中心</a>
                </c:if>
                <img src="images/separator.gif" />
                <a href="help.html">
                    <i class="fa-solid fa-circle-question"></i>
                </a>
            </div>
        </div>
    
        <div id="Search">
            <div id="SearchContent">
                <form action="SearchProductsForm" method="post" accept-charset="UTF-8">
                    <div id="SearchBox">
                        <input id="SearchInput" type="text" name="searchInfo" autocomplete="off" placeholder="查找宠物">
                        <input id="SearchSubmit" type="submit" name="searchProducts" value="搜索">
                    </div>
                </form>
                <div id="AutoComplete">
                    <ul id="ACList">

                    </ul>
                </div>
            </div>
        </div>
    </div>

<div id="Content">

    <div id="TipMessage">
        <img src="images/separator.gif" />
        <c:if test="${sessionScope.loginUser != null}">
            欢迎光临，<a href="AccountForm">${sessionScope.loginUser.userid}</a>
        </c:if>
        <c:if test="${sessionScope.loginUser == null}">
            欢迎光临
        </c:if>
        <img src="images/separator.gif" />
    </div>
